<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
    <head>
        <meta http-equiv="content-type" content="text/html; charset=utf-8"/>
        <title>0.0 0.0</title>
        <script type="text/javascript" src="http://maps.google.com/maps?file=api&amp;v=2&amp;oe=utf-8"></script>
        <script type="text/javascript">
            //<![CDATA[
            var map;
            function parseCoords() {
                data = document.location.href.split("?");
                if (data.length < 2) {
                    res = new Array(0.0, 0.0, 1);
                } else {
                    c = data[1].split(",");
                    lat = c[0]; lng = c[1];
                    res = new Array(parseFloat(lat), parseFloat(lng), 11);
                };
                return res;
            };
            function clickFunc(marker, point) {
                document.title = point.lat().toFixed(5) + " " + point.lng().toFixed(5);
                map.clearOverlays();
                map.addOverlay(new GMarker(point));
            };
            function initialize() {
                res = parseCoords();
                lat = res[0]; lng = res[1]; zoom = res[2];
                if (GBrowserIsCompatible()) {
                    map = new GMap2(document.getElementById("map_canvas"));
                    map.enableScrollWheelZoom();
                    centre = new GLatLng(lat, lng);
                    map.setCenter(centre, zoom);
                    map.setUIToDefault();
                    if (lat != 0 || lng != 0) {
                        clickFunc(null, centre);
                    };
                    GEvent.addListener(map, "click", clickFunc);
                };
            };
            //]]>
        </script>
    </head>
    <body onload="initialize();" onunload="GUnload();">
        <div id="map_canvas" style="width:300px; height:250px;"></div>
    </body>
</html>
